<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}


        <ul>
            <li @click='aa(index)' v-for="(item, index) in arr" :key="item.id">
                {{item.id}}={{item.name}}=={{item.age}}===索引{{index}}
            </li>
        </ul>
    </div>
    <script type='text/javascript'>
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue',

                arr: [
                    { id: 1, name: 'jack', age: 18,url:'./11.png'  },
                    { id: 2, name: 'jack2', age: 19},
                    { id: 3, name: 'jack3', age: 20,url:'./11.png'  },
                    { id: 4, name: 'jack4', age: 21 },
                ],
                
            },
            methods:{
                    aa(i){
                        console.log(i,2222);
                        
                    }
                }
        });
    </script>
</body>

</html>